package com.jk.service.impl;

import com.jk.bean.Author;
import com.jk.bean.HuiFu;
import com.jk.bean.PingLun;
import com.jk.mapper.TaRenZhuYeMapper;
import com.jk.service.TaRenZhuYeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 骚骚的🐏
 * @Author: 杨
 * @Date: 2019/3/11 14:53
 */
@Service
public class TaRenZhuYeServiceImpl implements TaRenZhuYeService {
    @Resource
    private TaRenZhuYeMapper taRenZhuYeMapper;

    @Override
    public List<Author> queryAuthor(String id) {
        List<Author> list=taRenZhuYeMapper.queryAuthor(id);
        return list;
    }

    @Override
    public List<PingLun> queryPingLun(String id, String nameid) {
        List<PingLun> list=taRenZhuYeMapper.queryPingLun(id,nameid);
        return list;
    }

    @Override
    public void addPingLun(PingLun pingLun) {
        taRenZhuYeMapper.addPingLun(pingLun);
    }

    @Override
    public void addHuiFu(HuiFu huiFu) {
        taRenZhuYeMapper.addHuiFu(huiFu);
    }
     //查询评论人图片和名字
    @Override
    public Author queryPinglunren(Integer pinglunrenid) {
        Author au = taRenZhuYeMapper.queryPinglunren(pinglunrenid);
        return au;
    }
   //查询回复
    @Override
    public List<HuiFu> queryHuiFu(String pinglunid) {
        List<HuiFu> list= taRenZhuYeMapper.queryHuiFu(pinglunid);
        return list;
    }

    @Override
    public List<String> queryStv() {
        return taRenZhuYeMapper.queryStv();
    }
}
